Daily POC Lines - Clustered
Overview
This indicator automatically plots horizontal lines at the Point of Control (POC) for each daily candle, intelligently clustering nearby levels to reduce visual noise and highlight the most significant price zones where volume concentration occurred.
What Makes This Original
Unlike standard volume profile indicators that show static profiles for the entire chart, this script:
Calculates individual POC levels for each daily candle within a user-defined lookback period
Implements an intelligent clustering algorithm that merges POC levels within a customizable percentage threshold, preventing chart clutter from redundant lines
Dynamically highlights high-significance clusters (multiple days sharing the same POC level) with customizable visual styling
Provides granular control over line extension, label positioning, and visual appearance
How It Works
The script divides each daily candle's price range into configurable bins (default 20) and distributes the day's volume across these levels to approximate the POC. When multiple days produce POC levels within the specified clustering threshold (default 2%), they merge into a single line with a counter showing how many days share that level.
Key Features
Adjustable lookback period (1-500 candles)
Intelligent clustering with customizable threshold percentage
Separate styling controls for regular POCs vs. high-count clusters
Toggle visibility for lines and labels independently
Configurable line colors, widths, styles (solid/dashed/dotted), and extension
Date labels with cluster count indicators
Adjustable label positioning and offset
Use Cases
Traders can use clustered POC levels to:
Identify key support and resistance zones based on historical volume concentration
Recognize high-significance price levels where multiple days' POCs converge
Reduce chart clutter while maintaining visibility of important volume-based levels
Combine with other technical analysis methods for confluence
Settings
The indicator organizes inputs into four logical groups:
General Settings - Lookback period, cluster threshold, volume bins
Line Settings - Visibility, color, width, style, and extension options
Label Settings - Visibility, position, offset, and color
Cluster Highlights - Threshold and custom styling for high-count clusters
Important Notes
This script uses an approximation method for POC calculation by dividing each candle's range into bins. For maximum accuracy, use on daily timeframe charts. The clustering feature is particularly useful when analyzing longer lookback periods where many POC levels may naturally converge around similar price zones.
Technical Details
Written in Pine Script v5
Maximum 500 lines on chart
Requests daily timeframe data using security function
Uses arrays to store and manage POC data efficiently
Redraws all lines on the last bar for optimal performance
Pine Script® インジケーター






















